<template>
  <div>
    <el-form :model="{}" size="medium" :inline="true" label-width="60px">
      <el-form-item label="操作栏" prop="">
        <el-button type="primary" plain icon="el-icon-plus" size="medium" @click="handleAdd"
          v-hasPermi="['manage_loanreturn_add']">设备外借</el-button>
      </el-form-item>
      <el-form-item label="" prop="">
        <el-button type="success" plain icon="el-icon-refresh" size="medium" @click="handleRecon"
          v-hasPermi="['manage_loanreturn_return']">外借归还</el-button>
      </el-form-item>
    </el-form>
    <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    <!-- 申请处置 -->
    <template v-if="opendetailed">
      <AddAllocation :title="title" @handleUpdate="handleUpdate"></AddAllocation>
    </template>
    <template v-if="open">
      <Reconsideration @handleUpdate="handleUpdate"></Reconsideration>
    </template>
  </div>
</template>

<script>
export default {
  components: {
    AddAllocation: () => import('../form/addAllocation.vue'),
    Reconsideration: () => import('../form/reconsideration.vue')
  },
  data () {
    return {
      title: '设备领用',
      open: false,
      opendetailed: false
    }
  },
  methods: {
    /** 新增按钮操作 */
    handleAdd () {
      this.opendetailed = true
    },
    handleRecon () {
      this.open = true
    },
    /** 修改按钮操作 */
    handleUpdate () {
      this.opendetailed = false
      this.open = false
      this.$emit('selectList')
    },
    /** 删除按钮操作 */
    handleDelete (row) {

    },
  }
}
</script>

<style>
</style>